package edu.mis.model.base;

import com.jfinal.plugin.activerecord.IBean;
import com.jfinal.plugin.activerecord.Model;

/**

 * 商品类别

 * 有7个属性

 * id int

 * name VARCHAR 商品名

 * price double 商品价格

 * quantity int 商品库存

 * address VARCHAR 商品产地

 * comment VARCHAR 商品说明

 * categoryId int 商品所属类别id

 */
@SuppressWarnings({"serial", "unchecked"})
public class BaseProduct<M extends BaseProduct<M>> extends Model<M> implements IBean {

	public M setId(java.lang.Integer id) {
		set("id", id);
		return (M)this;
	}

	public java.lang.Integer getId() {
		return getInt("id");
	}
	
	public M setName(java.lang.String name) {
		set("name", name);
		return (M)this;
	}

	public java.lang.String getName() {
		return getStr("name");
	}
	
	public M setPrice(double price) {
		set("price",price);
		return (M)this;
	}
	
	public double getPrice() {
		return this.getDouble("price");
	}
	
	public M setQuantity(int quantity) {
		set("quantity",quantity);
		return (M)this;
	}
	
	public int getQuantity() {
		return this.getInt("quantity");
	}
	
	public M setAddress(java.lang.String address) {
		set("address", address);
		return (M)this;
	}

	public java.lang.String getAddress() {
		return getStr("address");
	}
	
	public M setComment(java.lang.String comment) {
		set("comment", comment);
		return (M)this;
	}

	public java.lang.String getComment() {
		return getStr("comment");
	}
	
	public M setCategoryId(java.lang.Integer categoryId) {
		set("categoryId", categoryId);
		return (M)this;
	}

	public java.lang.Integer getCategoryId() {
		return getInt("categoryId");
	}
}
